/****************************************************************************
** @brief
****************************************************************************/

#ifndef ANYOWIDGET_H
#define ANYOWIDGET_H

#include <QMainWindow>

#include "controllerMain.h"

class FormPassword;

class QTimer;

class ChargeMain;
class CardMain;
class HciMain;
class OiovCallback;
class OiovResMain;
class OiovReqMain;
class BaseUpdate;
class BaseUIData;
class RecordMain;
class IotUpgrade;

namespace Ui {
class FormMainWindow;
}

class FormMainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit FormMainWindow(QWidget *parent = 0);
    ~FormMainWindow();

protected:

private:
    Ui::FormMainWindow *ui;
    FormPassword *formPassword_ = nullptr;

    QTimer *dummyTimer = nullptr;

    QList<ChargeMain *> chargeMainList_;
    HciMain *hciMain_ = nullptr;
    CardMain *cardMain_ = nullptr;

    OiovCallback *oiovCallback_ = nullptr;
    OiovResMain *oiovResMain_ = nullptr;
    OiovReqMain *oiovReqMain_ = nullptr;

    IotUpgrade *iotUpgrade_ = nullptr;

    BaseUpdate *baseUpdate_ = nullptr;

    RecordMain *orderRecord_ = nullptr;

    ControllerParserMain controllerParserMain_;
    ControllerRecvMain controllerRecvMain_;
    ControllerSendMain controllerSendMain_;

signals:
    void HandleConfig();

public slots:
    void ChangePage(const quint8& index);
    void ShowSysConfigData(const BaseUIData& data);
    void ShowSysCheckData(const BaseUIData& uiData);
    void UpdateData(const BaseUIData& uiData);
    void UpdateDateTime();

private slots:
    void HandleButton();
};

#endif // ANYOWIDGET_H
